package command.source;

/**
 * 具体的实现类
 * 将一个接收者对象绑定于一个动作，调用接收者相应的操作
 * 内部维护一个Receiver对象
 * @author Chen Guang
 * @date 2019/4/22 0022 上午 10:12
 */
public class ConcreteConmmand implements Command{

    private Receiver receiver;

    public ConcreteConmmand(Receiver receiver) {
        this.receiver = receiver;
    }

    @Override
    public void execute() {
        receiver.action();
    }
}
